import request from '@/utils/request'
//考试管理接口
export function testExamQuery(data) {
	//分页列表
	return request({
		method: 'get',
		url: '/testExam/query',
		params: data,
	})
}

export function testExamQueryById(id) {
	//查询
	return request({
		method: 'get',
		url: '/testExam/query/' + id,
	})
}

export function testExamAdd(data) {
	//添加
	return request({
		method: 'post',
		url: '/testExam/add',
		data,
	})
}

export function testExamDelete(id) {
	//删除
	return request({
		method: 'get',
		url: '/testExam/delete/' + id,
	})
}

export function testExamUpdate(data) {
	//修改
	return request({
		method: 'post',
		url: '/testExam/update',
		data,
	})
}

export function testExamQueryMyExam(data) {
	//分页列表
	return request({
		method: 'get',
		url: '/testExam/queryMyExam',
		params: data,
	})
}

export function testExamGeneratePaper(id) {
	//生成试卷
	return request({
		method: 'get',
		url: '/testExam/generatePaper/' + id,
	})
}

export function testExamSubmitPaper(data) {
	//修改
	return request({
		method: 'post',
		url: '/testExam/submitPaper',
		data,
	})
}

export function testExamHisQuery(data) {
	//历史考试卷信息分页列表
	return request({
		method: 'get',
		url: '/testExamHis/query',
		params: data,
	})
}

export function testExamHisQueryById(id) {
	//查询一条历史考试卷信息
	return request({
		method: 'get',
		url: '/testExamHis/query/' + id,
	})
}

// 修改分数
export function reviewPaperExamHis(id, data) {
	return request({
		url: "/testExamHis/reviewPaper/" + id,
		method: "post",
		data: data,
	});
}

// 修改分数
export function testExamHisAnalyze(id) {
	return request({
		url: "/testExamHis/analyzeTestQuestions/" + id,
		method: "get"
	});
}

// 获取考试学员数据
export function getExamStudentData(id) {
	return request({
		method: "get",
		url: "/testExam/examStat/" + id
	});
}

// 查询未参考学员
export function queryNotSubmit(params) {
	return request({
		method: "get",
		url: "/testExam/queryNotSubmit",
		params
	});
}

//导出不及格学员
export function exportNotPass(id) {
	return request({
		method: "get",
		url: "/testExam/exportNotPass/" + id
	});
}

//导出未交卷学员
export function exportNotSubmit(id) {
	return request({
		method: "get",
		url: "/testExam/exportNotSubmit/" + id
	});
}